<template>
  <div>
    <mavon-editor 
      v-model="mdContent"
      :subfield="prop.subfield"
      :defaultOpen="prop.defaultOpen"
      :toolbarsFlag="prop.toolbarsFlag"
      :editable="prop.editable"
      :scrollStyle="prop.scrollStyle"
      :boxShadow="prop.boxShadow"
      ref="md"
      style="z-index:1"
    />
  </div>
</template>

<script>
import { getAboutUs } from "../api/read";
export default {
  data() {
    return {
      mdContent: "",
    };
  },
  mounted() {
    this.getAboutUsArticle();
  },
  methods: {
    getAboutUsArticle() {
      getAboutUs()
        .then(({ data }) => {
          console.log(data.data);
          this.mdContent = data.data.aboutOurContent;
        })
        .catch((err) => {
          console.log(err);
        });
    },
  },
  computed: {
    prop() {
      let data = {
        subfield: false, // 单双栏模式
        defaultOpen: "preview", //edit： 默认展示编辑区域 ， preview： 默认展示预览区域
        editable: false,
        toolbarsFlag: false,
        scrollStyle: false,
        boxShadow: false, //边框
      };
      return data;
    },
  },
};
</script>

<style>
</style>